<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div.d {
            display: none;
        }
        
        div.v {
            visibility: hidden;
        }
    </style>
</head>

<body>


    <div>可见的div1</div>
    <div class="d">隐藏的div2,使用display:none隐藏</div>
    <div>可见的div3</div>
    <div class="v">隐藏的div4,使用visibility:hidden隐藏</div>
    <div>可见的div5</div>
</body>

</html>